package com.example.designPatten.decoracor;

import com.example.designPatten.decoracor.coffee.DarkRoast;
import com.example.designPatten.decoracor.coffee.Espresso;
import com.example.designPatten.decoracor.coffee.HouseBlend;
import com.example.designPatten.decoracor.flavour.Mocha;
import com.example.designPatten.decoracor.flavour.Soy;
import com.example.designPatten.decoracor.flavour.Whip;

/**
* @Title:   []
* @Description: 
* @Date : 2016年4月22日上午10:14:21
* @Company: SI-TECH
* @author : LIJXD
* @version : 1.0
* @modify history
*  <p>修改日期    修改人   修改目的<p> 	
*/
public class StarBussCoffee {

	/**
	* 名称：装饰者模式 
	* @param 
	* @return 
	* @throws Exception
	* @author LIJXD
	*/
	public static void main(String[] args) {
		Beverage  beverate = new Espresso();
		System.out.println(beverate.getDescription() +" $"+beverate.cost() );
		
		Beverage beverate2 = new DarkRoast();
		beverate2 = new Mocha(beverate2);
		beverate2 = new Mocha(beverate2);
		beverate2 = new Whip(beverate2);
		System.out.println(beverate2.getDescription() +" $"+beverate2.cost() );

		Beverage beverage3 = new HouseBlend();
		beverage3 = new Soy(beverage3);
		beverage3 = new Mocha(beverage3);
		beverage3 = new Whip(beverage3);
		System.out.println(beverage3.getDescription() +" $"+beverage3.cost() );

		
	}

}
